<template>
  <el-pagination
    :current-page.sync="start"
    :page-size="limit"
    layout="total, prev, pager, next"
    :total="total"
    @current-change="handleCurrentChange"
  />
</template>

<script>
import { getStaffCount } from '@/api/staff'
export default {
  // props: { tota: {
  //   type: Number
  // }},
  data() {
    return {
      total: 0,
      limit: 4,
      start: 1
    }
  },
  created() {
    this.getStaffCount()
  },
  methods: {
    // 获取数量
    async getStaffCount() {
      const { data } = await getStaffCount()
      // console.log(data)
      this.total = data
      // console.log(33, this.start);
    },
    // 页面改变，数据更新
    handleCurrentChange(val) {
      console.log(373737, val)

      this.$emit('changeStart', val)
    }
  }
}
</script>

<style>
</style>
